import { ResPage, E_Meter, ResultData } from "@/api/interface/index";
import http from "@/api";

/**
 * @name 电表管理模块
 */
// 获取电表列表
export const getE_MeterList = (params: E_Meter.ReqE_MeterInfoParams) => {
  return http.post<ResPage<E_Meter.ResE_MeterInfoList>>(`/electcollect/files/meter/query`, params);
};
// 获取电表详情
export const getE_MeterDtl = (params: { deviceId: string }) => {
  return http.post<ResultData>(`/electcollect/files/meter/detail`, params);
};
// 新增电表
export const addE_Meter = (params = {}) => {
  return http.post(`/electcollect/files/meter/add`, params);
};
// 编辑电表
export const editE_Meter = (params: { deviceId: string }) => {
  return http.post(`/electcollect/files/meter/modify`, params);
};

// 删除电表
export const deleteE_Meter = (params: { deviceList: { deviceId: string }[] }) => {
  return http.post(`/electcollect/files/meter/remove`, params);
};
